package com.funny.learning.english.activity;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class DemoCharFromStringActivity extends Activity{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		TextView textView = new TextView(this);
		String str = "apple";
		char[] cStr  = str.toCharArray();
		
		StringBuilder stringBuilder = new StringBuilder();
		
		for (int i = 0; i < cStr.length; i++) {
			String cutChar = String.valueOf(cStr[i]);
			stringBuilder.append(cutChar).append(",");
		}
		textView.setText(stringBuilder.toString());
		setContentView(textView);
	}
}
